package com.qyer.search.model.middle;

import com.qyer.search.engine.RecursiveSortTask;
import com.qyer.search.model.SecondComparableTuple2;
import com.qyer.search.model.lastminute.SKU;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by tangzheng on 16/5/17.
 */
public class RecursiveSortResult {
  private List<SKU> unknownList;
  private List<SecondComparableTuple2<SKU, Integer>> tuple2List;
  private int type;

  public RecursiveSortResult(List<SKU> unknownList,
                             List<SecondComparableTuple2<SKU, Integer>> tuple2List,
                             int type) {
    this.unknownList = unknownList;
    this.tuple2List = tuple2List;
    this.type = type;
  }

  public RecursiveSortResult(RecursiveSortResult r1, RecursiveSortResult r2){

    this.unknownList = new ArrayList<>();
    this.tuple2List = new ArrayList<>();
    this.unknownList.addAll(r1.getUnknownList());
    this.unknownList.addAll(r2.getUnknownList());
    this.tuple2List.addAll(r1.getTuple2List());
    this.tuple2List.addAll(r2.getTuple2List());
    this.type = r1.getType();

  }

  public List<SKU> getUnknownList() {
    return unknownList;
  }

  public void setUnknownList(List<SKU> unknownList) {
    this.unknownList = unknownList;
  }

  public List<SecondComparableTuple2<SKU, Integer>> getTuple2List() {
    return tuple2List;
  }

  public void setTuple2List(List<SecondComparableTuple2<SKU, Integer>> tuple2List) {
    this.tuple2List = tuple2List;
  }

  public int getType() {
    return type;
  }

  public void setType(int type) {
    this.type = type;
  }
}
